]> dgit.raspbian.org Git - qt6-tools.git/commit
Look for zstd before Clang
authorPino Toscano <pino@debian.org>
Sun, 20 Sep 2026 15:04:07 +0000 (17:04 +0200)
committerPatrick Franz <deltaone@debian.org>
Sun, 20 Sep 2026 15:04:07 +0000 (17:04 +0200)
commit4d03336ad8a61efb33bf212f1d2e900df04d4241
tree440124d71d9ea94a81b42f03081c7096c6c8d26f
parent28b173bf5ae1f333902a90b36c60a31822a50885
Look for zstd before Clang

Last-Update: 2026-08-22
Forwarded: not-needed

The story is more or less the following:
- LLVM ships its own Findzstd cmake find module from 16; this module defines
  2 targets: zstd::libzstd_shared and zstd::libzstd_static
- libzstd ships a cmake config module that defines 3 targets:
  zstd::libzstd_shared, zstd::libzstd_static, and zstd::libzstd
- the libzstd config module assumes that if one target is defined, all of them
  are, as if the config module itself was already run (i.e. multiple
  "find_package(zstd)" in a cmake project)
- in qttools, Clang is searched first, which in turns requires LLVM, and then
  libzstd

More details here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1073480#47

As workaround, look for libzstd before Clang: this way the proper zstd cmake
targets are defined, and the Findzstd cmake find module shipped with LLVM will
use them just fine without redefining them.

This should most likely be fixed on LLVM side.

Gbp-Pq: Name cmake-find-zstd-before-clang.diff
configure.cmake
src/designer/src/lib/CMakeLists.txt